home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-16 | 4.7 KB | 223 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: SLASinks.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * File: SLASinks.idl
- *
- * Contains: Interface for abstract sink classes
- *
- * Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- *
- */
-
-
- #ifndef SOM_FW_OSink_xh
- #define SOM_FW_OSink_xh
-
- class FW_OSink;
-
- #define FW_OSink_MajorVersion 1
- #define FW_OSink_MinorVersion 0
-
- /*
- * Passthru lines: File: "C.xh", "before"
- */
-
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_SOMObject_xh
- #include <somobj.xh>
- #endif
-
- #ifndef FW_OSink_API
- #define FW_OSink_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class FW_OSink;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define FW_OSinkCClassData FW_OSinkClassData
- #define FW_OSinkNewClass(major,minor) somNewVersionedClassReference(FW_OSink,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define FW_OSinkMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the FW_OSink class object, and the methods it introduces. */
- SOMEXTERN struct FW_OSinkClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken somInit;
- somMToken somUninit;
- somMToken GetReadableBytes;
- somMToken Read;
- somMToken GetWritableBytes;
- somMToken Write;
- } SOMDLINK FW_OSinkClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(FW_OSink_Class_Source) && !defined(SOM_Module_slasinks_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list FW_OSinkClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for FW_OSink Method Procedures
- */
- SOMEXTERN {
- typedef long (* SOMLINK somTD_FW_OSink_GetReadableBytes)(FW_OSink *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OSink_Read)(FW_OSink *somSelf, Environment *ev,
- void* destination,
- long count);
- typedef long (* SOMLINK somTD_FW_OSink_GetWritableBytes)(FW_OSink *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_FW_OSink_Write)(FW_OSink *somSelf, Environment *ev,
- void* source,
- long count);
- }
-
- #endif /* FW_OSink_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for FW_OSink
- */
- class FW_OSink : public SOMObject
- {
- public:
-
- // FW_OSink::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for FW_OSink, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(FW_OSink);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(FW_OSink);
- #endif
- }
-
- // FW_OSink::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: GetReadableBytes */
- long GetReadableBytes(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_OSink,FW_OSink,GetReadableBytes)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OSink,FW_OSink,GetReadableBytes)
- (this,ev);
- #endif
- }
-
- /* method: Read */
- void Read(Environment *ev,
- void* destination,
- long count)
- {
- SOM_ResolveD(this,FW_OSink,FW_OSink,Read)
- (this,ev,destination,count);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetWritableBytes */
- long GetWritableBytes(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- long __somResult =
- SOM_ResolveD(this,FW_OSink,FW_OSink,GetWritableBytes)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,FW_OSink,FW_OSink,GetWritableBytes)
- (this,ev);
- #endif
- }
-
- /* method: Write */
- void Write(Environment *ev,
- void* source,
- long count)
- {
- SOM_ResolveD(this,FW_OSink,FW_OSink,Write)
- (this,ev,source,count);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- }; /* FW_OSink */
-
-
-
- #endif /* SOM_FW_OSink_xh */
-